﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using NTwitter;
using System.Collections.ObjectModel;

namespace TwitterClient2.Components
{
    public class PanelMessages : Panel
    {
        public TabControl tabControl;
        private TabPageTransmittedReceived tabReceivedMessages;
        private TabPageTransmittedReceived tabTransmittedMessages;
        public TabPageSend tabSendMessage;


        private PanelNavigation panelNavaigation = new PanelNavigation("Messages", PanelNavigation.PANEL_MESSAGES);

        public PanelMessages()
        {
            InitializeComponent();
        }



        public void updateData(Collection<Message> received, Collection<Message> sent)
        {
            this.tabReceivedMessages.uploadData(received);
            this.tabTransmittedMessages.uploadData(sent);
        }

        private void InitializeComponent()
        {
            this.tabControl = new System.Windows.Forms.TabControl();
            this.tabReceivedMessages = new TabPageTransmittedReceived();
            this.tabTransmittedMessages = new TabPageTransmittedReceived();
            this.tabSendMessage = new TabPageSend();
            this.tabControl.SuspendLayout();
            this.SuspendLayout();
            // 
            // tabControl
            // 
            this.tabControl.Controls.Add(this.tabReceivedMessages);
            this.tabControl.Controls.Add(this.tabTransmittedMessages);
            this.tabControl.Controls.Add(this.tabSendMessage);
            this.tabControl.Dock = System.Windows.Forms.DockStyle.None;
            this.tabControl.Location = new System.Drawing.Point(10, 20);
            this.tabControl.Name = "tabControl";
            this.tabControl.SelectedIndex = 0;
            this.tabControl.Size = new System.Drawing.Size(220, 240);
            this.tabControl.TabIndex = 0;
            // 
            // tabReceivedMessages
            // 
            this.tabReceivedMessages.BackColor = System.Drawing.Color.LightGray;
            this.tabReceivedMessages.Location = new System.Drawing.Point(0, 0);
            this.tabReceivedMessages.Name = "tabReceivedMessages";
            this.tabReceivedMessages.Size = new System.Drawing.Size(220, 77);
            this.tabReceivedMessages.Text = "Received";
            // 
            // tabTransmittedMessages
            // 

            this.tabTransmittedMessages.Location = new System.Drawing.Point(0, 0);
            this.tabTransmittedMessages.Name = "tabTransmittedMessages";
            this.tabTransmittedMessages.Size = new System.Drawing.Size(92, 74);
            this.tabTransmittedMessages.Text = "Transmitted";
            // 
            // tabSendMessage
            // 
            this.tabSendMessage.Location = new System.Drawing.Point(0, 0);
            this.tabSendMessage.Name = "tabSendMessage";
            this.tabSendMessage.Size = new System.Drawing.Size(92, 150);
            this.tabSendMessage.Text = "Send";
            //
            // PanelNavigation
            //
            this.panelNavaigation.Location = new Point(10, 0);
            // 
            // PanelMessages
            // 
            this.Controls.Add(this.panelNavaigation);
            this.Controls.Add(this.tabControl);
            this.tabControl.ResumeLayout(false);
            this.ResumeLayout(false);

        }
    }
}
